<template>
	<view class="container">

		<view class="header">
			<image src="../../../static/chedui/zuojiantou.png" style="width: 30px; height: 30px;"></image>
			<text class="title">个人信息</text>
		</view>

		<view class="fff">
			<view class="info-list">

				<view class="info-item">
					<text class="info-label">我的头像</text>
					<image class="avatar" src="https://placehold.co/40x40" alt="用户头像"></image>
				</view>

				<view class="info-item">
					<text class="info-label">我的帐号</text>
					<text class="info-value">13453400987</text>
				</view>

				 

				<view class="info-item">
					<text class="info-label">我的角色</text>
					<view class="roles">
						<text class="role-tag">企业老板</text>
						<text class="role-tag super-admin">超级管理员</text>
						<text class="role-tag">扫码员</text>
						<text class="role-tag">运营人员</text>
					</view>
				</view>
			</view>
		</view>

	</view>
</template>

<script setup>
	// 这里可以使用Vue3的setup语法
	import { ref } from 'vue';
	// 定义 roles 数据
</script>

<style lang="scss" scoped>
	
	
	
	
	.container {
		width: 100%;
		background: #002fa7;
		min-height: 100vh;

		.header {
			display: flex;
			align-items: center;
			margin-bottom: 40rpx;
			height: 5vh;

			.avatar {
				width: 120rpx;
				height: 120rpx;
				border-radius: 50%;
				margin-right: 30rpx;
				border: 2rpx solid #eee;
			}

			.title {
				font-size: 36rpx;
				color: #ffffff;
			}
		}

		.fff {
			height: 100vh;
			background-color: #f2f2f2;
			border-radius: 32rpx;
			padding: 24rpx;
			margin-bottom: 20rpx;
			box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.05);


			.info-item .avatar {
				width: 40px;
				height: 40px;
				border-radius: 50%;
				margin-right: 10px;
			}

			.info-list {
				// height: 100vh;
				background-color: #fff;
				border-radius: 16rpx;
				padding: 0 30rpx;
				box-shadow: 0 4rpx 12rpx rgba(0, 0, 0, 0.05);
			}

			.info-item {
				padding: 30rpx 0;
				border-bottom: 1rpx solid #f0f0f0;
				display: flex;
				justify-content: space-between;
				flex-wrap: nowrap;
				&:last-child {
					border-bottom: none;
				}

				.info-label {
					font-size: 30rpx;
					color: #000000;
				}

				.info-value {
					font-size: 30rpx;
					color: #333;
					font-weight: 500;
				}
			}
			.info-item_left {
				display: flex;
				
			}

			.roles {
				display: flex;
				justify-content: space-between;
				flex-direction: column;
			}

			.role-tag {
				display: inline-block;
				padding: 8rpx 20rpx;
				background-color: #f0f0f0;
				border-radius: 30rpx;
				font-size: 24rpx;
				color: #666;
				margin-top: 10rpx;

				&.super-admin {
					background-color: #e6f7ff;
					color: #1890ff;
				}
			}
		}

	}
</style>